body {
    margin: 0;
    height: 100vh;
    font-family: Arial, sans-serif;
    overflow: hidden;
    background-color: #1e1e1e;
    min-height: 100vh;
}

#fileList {
    width: 290px;
    border-right: 1px solid #444;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    background-color: #252526;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: fixed;
    left: 0;
    top: 0;
    height: calc(100vh - 200px);
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: width, height;
}

#fileList:hover {
    border-right-color: #444;
}

#fileList.resizing {
    transition: none !important;
    border-right: 2px solid #0078d4;
}

.button-container {
    position: absolute;
    top: 10px;
    right: 50px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.button-container button {
    pointer-events: auto;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background-color: #2d2d2d;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 28px;
}

.button-container button:hover {
    background-color: #404040;
}

.button-container button::before {
    content: "▶";
    font-size: 12px;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: 10px;
}

a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
}

.notification {
    position: fixed;
    bottom: 220px;
    right: 10px;
    background-color: #f44336;
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10000;
}

.file-list-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: #252526;
    padding: 0 0 10px 0;
    margin: 0 0 10px 0;
    z-index: 999;
}

#fileFilter {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 3px;
    background-color: #3c3c3c;
    color: #fff;
    font-size: 14px;
    height: 32px;
    box-sizing: border-box;
    outline: none;
}

#fileFilter:focus {
    border-color: #007fd4;
}

#addFileBtn {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: all 0.2s;
    white-space: nowrap;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: linear-gradient(to bottom right, #2979ff, #1565c0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#addFileBtn::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.9;
}

#addFileBtn:hover {
    opacity: 1;
    background-image: linear-gradient(to bottom right, #2962ff, #1976d2);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#addFileBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-image: linear-gradient(to bottom right, #1565c0, #0d47a1);
}

#fileListItems {
    position: relative;
    padding-top: 10px;
}

#fileListItems li {
    margin-bottom: 2px;
}

#fileListItems a {
    text-decoration: none;
    color: #ffffff;
    transition: all 0.2s;
    display: block;
    padding: 6px 10px;
    border-radius: 3px;
    background-color: transparent;
    font-size: 13px;
    position: relative;
    opacity: 0.8;
    cursor: move;
}

#fileListItems a:hover {
    color: #fff;
    background-color: #37373d;
    opacity: 1;
}

#fileListItems a.selected {
    background-color: #37373d;
    color: #fff;
    opacity: 1;
    font-weight: 500;
}

#fileListItems a::before {
    content: "📄";
    margin-right: 5px;
    opacity: 0.7;
}

#fileListItems a:hover::before,
#fileListItems a.selected::before {
    opacity: 1;
}

#outputPanel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    min-height: 32px;
    max-height: 80vh;
    background-color: #1e1e1e;
    border-top: 1px solid #444;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: height;
}

#outputPanel .resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    cursor: ns-resize;
    background: transparent;
    z-index: 1001;
}

#outputPanel.resizing {
    transition: none !important;
    border-top: 2px solid #0078d4;
}

.output-header {
    padding: 10px 14px;
    background-color: #2d2d2d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 15px;
    cursor: default;
    user-select: none;
    position: relative;
    z-index: 1000;
    transition: padding 0.2s;
}

#toggleOutput {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.7;
    transition: all 0.2s;
    height: 26px;
    min-width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggleOutput:hover {
    opacity: 1;
    background-color: #505050;
}

#toggleOutput::before {
    content: "▼";
    font-size: 10px;
    transition: transform 0.3s;
}

#toggleOutput.collapsed::before {
    transform: rotate(-90deg);
}

#outputPanel.collapsed {
    display: none !important;
}

#outputPanel.collapsed~#fileList {
    height: 100vh !important;
}

#outputPanel.collapsed~#container {
    height: 100vh !important;
}

#clearOutput {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.7;
    transition: opacity 0.2s;
    height: 26px;
    min-width: 50px;
}

#clearOutput:hover {
    opacity: 1;
}

#copyOutput {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.7;
}

#copyOutput:hover {
    opacity: 1;
}

#outputContent {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    color: #ffffff;
    font-family: Consolas, monospace;
    font-size: 14px;
    line-height: 1.4;
    background-color: #1e1e1e;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
    user-drag: none;
}

#outputContent * {
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
    user-drag: none;
}

.output-success {
    color: #4caf50;
}

.output-error {
    color: #f44336;
}

.output-info {
    color: #2196f3;
}



.output-buttons {
    display: flex;
    gap: 10px;
}

#formatOutput {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-family: monospace;
    font-weight: bold;
    height: 26px;
    min-width: 50px;
}

#formatOutput:hover {
    opacity: 1;
}

.file-list-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#addFileBtn {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
    white-space: nowrap;
}

#addFileBtn:hover {
    opacity: 1;
    background-color: #094771;
}

.context-menu {
    position: fixed;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 5px 0;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.context-menu-item {
    padding: 10px 18px;
    cursor: pointer;
    color: #fff;
    font-size: 15px;
}

.context-menu-item:hover {
    background-color: #094771;
}

.context-menu-item.delete {
    color: #ff4444;
    position: relative;
    padding-left: 35px;
}

.context-menu-item.delete::before {
    content: "🗑";
    position: absolute;
    left: 12px;
    opacity: 0.9;
}

.context-menu-item.delete:hover {
    background-color: #ff44441f;
    color: #ff6666;
}

.folder {
    margin-bottom: 5px;
}

.folder-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 10px;
    cursor: pointer;
    color: #ffffff;
    opacity: 0.8;
    transition: all 0.2s;
    position: relative;
    text-align: left;
}

.folder-header:hover {
    background-color: #37373d;
    opacity: 1;
}

.folder-header::before {
    content: "📁";
    margin-right: 5px;
    opacity: 0.7;
}

.folder-header.open::before {
    content: "📂";
}

.folder-content {
    margin-left: 20px;
    display: none;
}

.folder-content.open {
    display: block;
}

#addFolderBtn {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    transition: all 0.2s;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-header.drag-over {
    background-color: #094771;
}

.folder-header.drag-over::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border: 2px dashed #2979ff;
    border-radius: 3px;
    pointer-events: none;
}



.file-list-resize-handle {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    background-color: transparent;
    transition: background-color 0.2s;
    z-index: 1001;
}

.file-list-resize-handle:hover,
.file-list-resize-handle.resizing {
    background-color: transparent;
}

.dragging {
    opacity: 0.5;
}

.drag-over-top {
    border-top: 2px solid #2979ff;
}

.drag-over-bottom {
    border-bottom: 2px solid #2979ff;
}

#fileListItems li {
    transition: border-color 0.2s;
}

.file-container {
    display: flex;
    align-items: center;
    padding: 2px 0;
}

.sort-buttons {
    display: flex;
    gap: 2px;
    margin-left: 8px;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.file-container:hover .sort-buttons,
.folder-header:hover .sort-buttons {
    opacity: 1;
}

.sort-button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    line-height: 1;
}

.sort-button:hover {
    color: #2979ff;
}

.folder-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 10px;
    cursor: pointer;
    color: #ffffff;
    opacity: 0.8;
    transition: all 0.2s;
    position: relative;
    text-align: left;
}

/* NuGet Dialog Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #252526;
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 16px 20px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #444;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.close-button {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-button:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.nuget-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.nuget-search input {
    flex: 1;
    padding: 8px 12px;
    background-color: #3c3c3c;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.nuget-search button {
    padding: 8px 16px;
    background-color: #0078d4;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.nuget-search button:hover {
    background-color: #106ebe;
}

.nuget-results {
    margin-bottom: 20px;
}

.package-item {
    padding: 15px;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #2d2d2d;
}

.package-item h3 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 16px;
}

.package-item p {
    margin: 0 0 8px 0;
    color: #ccc;
    font-size: 14px;
}

.package-item .version {
    color: #0078d4;
    font-size: 13px;
}

.package-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.package-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
}

.install-button {
    background-color: #13a10e;
    color: #fff;
}

.install-button:hover {
    background-color: #16c60c;
}

.remove-button {
    background-color: #d83b01;
    color: #fff;
}

.remove-button:hover {
    background-color: #f03f03;
}

#nugetBtn {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    transition: all 0.2s;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#nugetBtn:hover {
    opacity: 1;
    background-color: #094771;
}

/* NuGet Configuration Styles */
.nuget-config-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #2d2d2d;
    border-radius: 4px;
}

.nuget-config-section h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 16px;
}

.package-references {
    margin-bottom: 15px;
}

.no-packages-message {
    color: #888;
    font-style: italic;
    padding: 10px;
    text-align: center;
    background-color: #363636;
    border-radius: 4px;
}

.package-reference {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #363636;
    border-radius: 4px;
    margin-bottom: 8px;
}

.package-reference-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.package-reference-name {
    color: #fff;
    font-weight: 500;
}

.package-reference-version {
    color: #0078d4;
    font-size: 13px;
}

.add-package-button {
    background-color: #13a10e;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.add-package-button:hover {
    background-color: #16c60c;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #fff;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 8px 12px;
    background-color: #3c3c3c;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0078d4;
}

.modal-footer {
    padding: 15px 20px;
    background-color: #2d2d2d;
    border-top: 1px solid #3c3c3c;
    display: flex;
    justify-content: flex-end;
}

.save-button {
    background-color: #0078d4;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.save-button:hover {
    background-color: #106ebe;
}

.package-reference .remove-button {
    padding: 6px 12px;
    background-color: #d83b01;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.package-reference .remove-button:hover {
    background-color: #f03f03;
}

#outputContent::-webkit-scrollbar {
    width: 10px;
}

#outputContent::-webkit-scrollbar-track {
    background: #1e1e1e;
}

#outputContent::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 0;
}

#outputContent::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}


.result-streaming {
    position: relative;
}

.result-streaming p {
    display: inline;
}

/* 移除所有默认的光标 */
.result-streaming *::after {
    display: none;
}

/* 只有当最后一个元素是纯文本时才在容器层面显示光标 */
.result-streaming:not(:has(pre:last-child, ul:last-child, ol:last-child))::after {
    content: "▋";
    margin-left: .25rem;
    vertical-align: baseline;
    animation: cursor-blink 1s infinite;
    display: inline-block;
}

/* 代块的光标 */
.result-streaming>pre:last-child code::after {
    content: "▋";
    margin-left: .25rem;
    vertical-align: baseline;
    animation: cursor-blink 1s infinite;
    display: inline-block;
}

/* 列表的光标 */
.result-streaming>ul:last-child>li:last-child::after,
.result-streaming>ol:last-child>li:last-child::after {
    content: "▋";
    margin-left: .25rem;
    vertical-align: baseline;
    animation: cursor-blink 1s infinite;
    display: inline-block;
}

@keyframes cursor-blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}



#outputContent {
    padding: 10px;
    border-radius: 5px;
}

pre {
    background: #4f4f4f;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

#fileList::-webkit-scrollbar {
    width: 10px;
}

#fileList::-webkit-scrollbar-track {
    background: #1e1e1e;
}

#fileList::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 0;
}

#fileList::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}

/* 调整大小时禁用过渡效果 */
#outputPanel.resizing,
#outputPanel.resizing~#fileList,
#outputPanel.resizing~#container {
    transition: none !important;
}

#outputPanel.collapsed .output-header {
    padding: 4px 14px;
}

.minimized-output-button {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
    display: none;
}

#outputPanel.collapsed~.minimized-output-button {
    display: block;
}

.minimized-output-button .icon-button {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2d2d2d;
    border: 1px solid #444;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    opacity: 0.8;
    transition: all 0.2s;
    padding: 0;
}

.minimized-output-button .icon-button:hover {
    background: #404040;
    opacity: 1;
    transform: translateY(-1px);
}

.minimized-output-button .icon-button:active {
    transform: translateY(0);
}

/* 调整大小时禁用过渡效果 */
#fileList.resizing,
#fileList.resizing~#container {
    transition: none !important;
}

/* 调整大小手柄的样式优化 */
.file-list-resize-handle {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    background-color: transparent;
    transition: background-color 0.2s;
    z-index: 1001;
}

/* 统一的调整大小手柄样式 */
.file-list-resize-handle,
#outputPanel .resize-handle,
#chatPanel .resize-handle {
    position: absolute;
    background: transparent;
}

/* 水平调整手柄（文件列表和聊天面板） */
.file-list-resize-handle,
#chatPanel .resize-handle {
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
}

.file-list-resize-handle {
    right: -5px;
}

/* 调整时的边框高亮 */
#fileList.resizing {
    border-right: 2px solid #0078d4;
    transition: none !important;
}

/* 调整时禁用过渡效果 */
#fileList.resizing,
#fileList.resizing~#container {
    transition: none !important;
}

/* Chat Panel */
#chatPanel {
    position: fixed;
    right: 0;
    top: 0;
    width: 520px;
    height: calc(100vh - 200px);
    background: #1e1e1e;
    border-left: 1px solid #444;
    display: flex;
    flex-direction: column;
    z-index: 999;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, height, width;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
}

.chat-header {
    padding: 12px 16px;
    background: #2d2d2d;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.chat-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

#modelSelect {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #3d3d3d;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

#modelSelect:hover {
    border-color: #666;
    background: #444;
}

#clearChat {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.8;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

#clearChat:hover {
    opacity: 1;
    background-color: #505050;
}

#toggleChat {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.8;
    transition: all 0.2s;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggleChat:hover {
    opacity: 1;
    background-color: #505050;
}

#toggleChat::before {
    content: "▼";
    font-size: 10px;
    transition: transform 0.3s;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #1e1e1e;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    position: relative;
    margin-bottom: 4px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message:hover {
    background: linear-gradient(135deg, #2b579a, #1e3d6b);
}

.user-message {
    background: linear-gradient(135deg, #2b579a, #1e3d6b);
    margin-left: auto;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.assistant-message {
    background: #2d2d2d;
    margin-right: auto;
    color: #ffffff;
    border-bottom-left-radius: 4px;
}

.assistant-message:hover {
    background: #363636;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid #444;
    display: flex;
    gap: 12px;
    background: #2d2d2d;
    position: relative;
    will-change: border-color;
}

#chatInput {
    flex: 1;
    resize: none;
    max-height: 500px;
    min-height: 60px;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #1e1e1e;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    will-change: height;
    transition: height 0.05s ease-out;
}

.chat-input-resize-handle {
    position: absolute;
    left: 0;
    right: 0;
    height: 10px;
    top: -5px;
    cursor: ns-resize;
    background: transparent;
    z-index: 1001;
}

.chat-input-area.resizing {
    border-top: 2px solid #0078d4;
    transition: none !important;
}

.chat-input-area.resizing #chatInput {
    transition: none !important;
}

#sendMessage {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0078d4, #0063b1);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sendMessage:hover {
    background: linear-gradient(135deg, #0086ec, #0078d4);
    transform: translateY(-1px);
}

#sendMessage:active {
    transform: translateY(0);
}

.minimized-chat-button {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.minimized-chat-button .icon-button {
    width: 32px;
    height: 32px;
    border-radius: 6px 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2d2d2d;
    border: 1px solid #444;
    border-right: none;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    opacity: 0.8;
    transition: all 0.2s;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
}

.minimized-chat-button .icon-button:hover {
    background: #404040;
    opacity: 1;
    transform: translateX(-2px);
}

.minimized-chat-button .icon-button:active {
    transform: translateX(0);
}

/* 调整 resize-handle 样式 */
#chatPanel .resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
    background: transparent;
    z-index: 1001;
}

#chatPanel .resize-handle:hover {
    background: rgba(0, 120, 212, 0.2);
}

#chatPanel.resizing {
    transition: none !important;
    border-left: 2px solid #0078d4;
}

#chatPanel.resizing .resize-handle {
    background: rgba(0, 120, 212, 0.3);
}

#chatPanel.resizing::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #0078d4;
    z-index: 1002;
}

/* 调整编辑器容器的宽度计算 */
#container {
    width: calc(100% - 290px - 520px);
    margin-left: 290px;
    margin-right: 520px;
    position: fixed;
    top: 0;
    height: calc(100vh - 200px);
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.2s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: width, margin-left, margin-right;
}

/* 调整大小时禁用过渡效果 */
#chatPanel.resizing~#container {
    transition: none !important;
}

/* 自定义滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 调整大小时禁用过渡效果 */
#chatPanel.resizing~#container {
    transition: none !important;
}

/* 移除所有hover效果 */
#outputPanel .resize-handle:hover,
#outputPanel.resizing .resize-handle,
#chatPanel .resize-handle:hover,
#chatPanel.resizing .resize-handle {
    background: transparent;
}

/* 统一的调整大小手柄样式 */
.file-list-resize-handle,
#outputPanel .resize-handle,
#chatPanel .resize-handle {
    position: absolute;
    background: transparent;
}

/* 水平调整手柄（文件列表和聊天面板） */
.file-list-resize-handle,
#chatPanel .resize-handle {
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
}

.file-list-resize-handle {
    right: -5px;
}

/* 聊天窗口的调整手柄更宽 */
/* #chatPanel .resize-handle {
    left: -10px;
    width: 20px;
} */

/* 垂直调整手柄（输出面板） */
#outputPanel .resize-handle {
    left: 0;
    right: 0;
    height: 10px;
    top: -5px;
    cursor: ns-resize;
}

/* 统一的调整时边框样式 */
#fileList.resizing {
    border-right: 2px solid #0078d4;
    transition: none !important;
}

#outputPanel.resizing {
    border-top: 2px solid #0078d4;
    transition: none !important;
}

#chatPanel.resizing {
    border-left: 0px solid #0078d4;
    transition: none !important;
}

/* 调整时禁用过渡效果 */
#fileList.resizing,
#fileList.resizing~#container,
#outputPanel.resizing,
#outputPanel.resizing~#fileList,
#outputPanel.resizing~#container,
#chatPanel.resizing,
#chatPanel.resizing~#container {
    transition: none !important;
}

/* 移除所有hover效果 */
.file-list-resize-handle:hover,
.file-list-resize-handle.resizing,
#outputPanel .resize-handle:hover,
#outputPanel.resizing .resize-handle,
#chatPanel .resize-handle:hover,
#chatPanel.resizing .resize-handle {
    background: transparent;
}

/* 模型设置按钮 */
#modelSettingsBtn {
    background-color: #444;
    border: none;
    color: #fff;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.8;
    transition: all 0.2s;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modelSettingsBtn:hover {
    opacity: 1;
    background-color: #505050;
}

/* 模型设置对话框 */
.model-settings {
    padding: 0;
}

.model-list-header {
    margin-bottom: 16px;
}

.model-list-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.add-model-button {
    padding: 8px 16px;
    background-color: #0078d4;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.add-model-button:hover {
    background-color: #106ebe;
}

#modelList {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.model-item {
    padding: 12px;
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
}

.model-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.model-name {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.model-endpoint {
    font-size: 12px;
    color: #888;
}

.model-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.edit-model,
.delete-model {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
}

.edit-model {
    background-color: #0078d4;
    color: #fff;
}

.edit-model:hover {
    background-color: #106ebe;
}

.delete-model {
    background-color: #d83b01;
    color: #fff;
}

.delete-model:hover {
    background-color: #f03f03;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 13px;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    background-color: #3c3c3c;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    box-sizing: border-box;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* 对话框样式优化 */
.modal-content {
    background-color: #252526;
    max-width: 600px;
    width: 90%;
    margin: 10vh auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 16px 20px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #444;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* API Key 输入框样式 */
.api-key-input {
    position: relative;
    display: flex;
    align-items: center;
}

.api-key-input input {
    flex: 1;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #fff;
}

/* 修改模型列表中显示API Key的样式 */
.model-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.model-endpoint,
.model-api-key {
    font-size: 12px;
    color: #888;
}

.model-api-key {
    font-family: monospace;
    letter-spacing: 1px;
}

/* 滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.context-menu-item.rename {
    position: relative;
    padding-left: 35px;
}

.context-menu-item.rename::before {
    content: "✏️";
    position: absolute;
    left: 12px;
    opacity: 0.9;
}

.context-menu-item.rename:hover {
    background-color: #094771;
    color: #ffffff;
}

.hljs {
    position: relative;
    padding-top: 25px;
}

.lang-label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 2px 8px;
    font-size: 12px;
    color: #001080;
    background: #ffffff;
    border-bottom: 1px solid #d4d4d4;
    border-right: 1px solid #d4d4d4;
    border-radius: 0 0 4px 0;
}

.copy-button {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 4px 8px;
    background: #ffffff;
    border: 1px solid #d4d4d4;
    border-radius: 3px;
    cursor: pointer;
    opacity: 1;
    color: #001080;
    font-family: Consolas, monospace;
}

.copy-button:hover {
    background: #f0f0f0;
    border-color: #007acc;
}